package com.hailong.zyt.service;

import com.hailong.zyt.beans.Course;
import com.hailong.zyt.beans.Student;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hailong.zyt.mapper.StudentMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.ui.Model;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hailong
 * @since 2021-05-17
 */
public interface StudentService extends IService<Student> {
    //获得mapper
    StudentMapper getStudentMapper();

    //根据ID找选了几门课
    Integer getCourseCount(Long stuId);

    //根据ID找加入了几个小组
    Integer getGroupCount(Long stuId);

    //获得作业 完成数/总数
    String getHWFinishedRate(Long stuId);

    //添加学生
    boolean addStudent(Student newStudent, Model model);

    //修改密码
    boolean changePassword(Student student, String newPassword, String reNewPassword, Model model);

}
